<!DOCTYPE html>
<html>
{include file="public/head" /}
<body>
          <div class="nav-tabs-custom" style="box-shadow:0 0 0 0; margin:5px;">
            <ul class="nav nav-tabs">
            <li class="active"><a href="#tab_1" data-toggle="tab">基础设置</a></li>
            <li><a href="#tab_2" data-toggle="tab">扩展设置</a></li>               
            </ul> 
        <form id="myform" class="myform form-horizontal"  method="post">
        <input type="hidden" id="part_id" name="part_id" value="{$info['part_id']|default=''}"> 
        <input type="hidden" id="part_vid" name="part_vid" value="{$info['part_vid']|default=''}"> 
       <div class="box-body">
           <div class="tab-content tab-fade fade active in " id="tab_1"> 
           <div class="row">             
          <div class="col-md-6 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">分集名称：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control" id="part_name" name="part_name" value="{$info.part_name|default=''}" >
              </div>   
              </div>
                            <div class="col-md-6 col-sm-6 col-xs-6 mb10">
               <span class="text-link form-control" style="border:none">
               <span class="pretty success input-xz">
<input name="sendurl" type="checkbox" value="1" id="checkbox" {empty name="info['part_id']"}checked{/empty}> 
<label><i class="mdi mdi-check"></i> 推送百度</label>
</span></span>  
              </div>  
                 <div class="col-md-12 col-sm-12 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">分集标题：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control" id="part_title" name="part_title" value="{$info.part_title|default=''}" > 
              </div>   
              </div>
              <div class="col-md-6 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">分集页数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control text-center" id="part_oid" name="part_oid" value="{$info.part_oid|default=''}" > 
              </div>   
              </div>
                <div class="col-md-6 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">分集状态：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
<select name="part_status" class="form-control select2" style="width:100%">
    <option value="1">已审</option>
     <option value="0" {eq name="info.part_status" value="0" }selected{/eq}>未审</option>
</select> 
              </div>   
              </div>   
                 <div class="col-md-12 col-sm-12 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">采集地址：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control" id="part_reurl" name="part_reurl" value="{$info.part_reurl|default=''}" placeholder="TV2345剧情地址,tvsou剧情地址,juqingba剧情地址,看剧情剧情地址,分集地址"> 
             <span class="input-group-btn">
                      <button type="button" class="btn  btn-primary btn-flat get_part">采集剧情</button>
                    </span>
              </div>   
              </div>                                                                       
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">分集内容：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <textarea  class="editor"  id="part_content" name="part_content"  style=" width:100%; height:200px">{$info['part_content']}</textarea>
              </div> 
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">添加时间：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
              <input type="text" name="part_addtime" value="{notempty name="info.part_addtime"}{$info.part_addtime|date='Y-m-d H:i:s',###}{else/}{:date('Y-m-d H:i:s',time())}{/notempty}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss">
              
<span class="input-group-btn">
<span class="pretty success input-xz">
<input name="part_checktime" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_uptime')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 更新时间</label>
</span>
</span>     
              </div>              
               </div>
              <!-- /row --> 
            </div>
            <!-- /.tab_1-->
           <div class="tab-content tab-fade fade " id="tab_2">
            <div class="row">         
             <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">推荐星级：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input name="part_stars" id="part_stars" type="hidden" value="{$info.part_stars|default=''}">
                <span class="text-link form-control" style="padding-top:4px;">
                {volist name=":admin_star_arr($info.part_stars)" id="ajaxstar"}<img src="{$Think.TPL_PATH}tpl/zanpianadmin/img/star{$ajaxstar}.gif" id="part_{$i}" class="addstars" width="19px" height="19px">{/volist}
                </span>
              </div>   
              </div>              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">独立模版：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="part_skin"  value="{$info.part_skin|default=''}" class="form-control text-center" placeholder="留空使用分类中内容模版">
              </div>   
              </div> 
                           <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">用户ID：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="part_uid" id="part_uid"  value="{$info.part_uid|default=''}" class="form-control text-center" >
              </div>   
              </div>
             <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">总人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="part_hits" name="part_hits"  value="{$info.part_hits|default=''}" class="form-control text-center" >
              </div>   
              </div>
              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">月人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="part_hits_month"  value="{$info.part_hits_month|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">周人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="part_hits_week"  value="{$info.part_hits_week|default=''}" class="form-control text-center" >
              </div>   
              </div>                                          
                                                                                    
              <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">日人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="part_hits_day"  value="{$info.part_hits_day|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              
               <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">顶人数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="part_up" name="part_up"  value="{$info.part_up|default='0'}" class="form-control text-center" >
              </div>   
              </div>
                           
                <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">踩人数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="part_down" name="part_down"  value="{$info.part_down|default='0'}" class="form-control text-center" >
              </div>   
              </div>
              </div>
              <!-- /row -->
                             
              
                                             
            </div> 
            <!-- /.tab_2 -->
         
        <div class="box-footer {notempty name=":request()->param('dialog')"}hidden{/notempty} layer-footer">
          <div  class="footer-btn">
               <button type="submit" class="btn btn-success btn-embossed">确定</button>
               <button type="reset" class="btn btn-default btn-embossed">重置</button>
               {notempty name=":request()->param('dialog')"}
               <button type="reset" class="btn btn-primary btn-embossed btn-close" onClick="layer.closeAll();"> 关闭</button>
               {/notempty}
            </div>
       </div>
       <!-- /.box-footer -->     
</div>
<!-- /.box-body --> 
</form>
</div>
<!-- /.nav-tabs-custom -->    
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	    zanpian.cms.all();
		$(document).on("click", ".get_part", function() {	
			if ($("#part_reurl").val() == '') {
						layer.msg('请填写采集网址', {icon:2,time: 1800});
						return false;
			}
                    layer.msg('数据获取中...');
					var $data = "url="+$("#part_reurl").val();
					$.ajax({type: 'post',url:zanpian.api.fixurl('get/fenji'),data:$data,dataType: 'json',
					success: function(data) {
									if (data.code == 1) {
									     $("#part_name").val(data.data.part_name);
					                     $("#part_title").val(data.data.part_title);
					                     var editor = config.editor;
					                     switch(editor){
					                     case "summernote":
					                     $("#part_content").summernote('code',data.data.part_content);
					                     break;
					                     case "kindeditor":    
					                     KindEditor.html("#part_content",data.data.part_content);
					                     break;
					                     case "ueditor":                          
					                     UE.getEditor("part_content").execCommand('insertHtml',data.data.part_content);
					                     break;	
					                     case "umeditor":
					                     UM.getEditor('part_content').setContent(data.data.part_content);		
					                     break;
					                     case "ckeditor":
					                     CKEDITOR.instances.part_content.setData(data.data.part_content);
					                     break;				
					                     default:
					                     break;
					                     } 
									     layer.msg('获取资料成功', {icon:1,time: 1800});										 
									} else {
						                 layer.msg(data.msg ? data.msg : '获取资料失败', {icon:2,time: 1800});
					                }
							},
				            error: function(data) {
					            layer.confirm('程序返回：' + data.status + ' 错误,点击查看详细错误', {zIndex:layer.zIndex,icon: 5, title:'出错啦！',btn: ['查看', '关闭']}, function() {$('html').html(data.responseText);});
				            },
						});			
											   
		});			

});	
</script>
</body>
</html>
